home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / mac / demoware / Asymptote 1.1 Demo / Scripts / Demos / 6) Linear Fit / Figure3d < prev    next >
Encoding:
Text File  |  1994-11-01  |  916 b   |  53 lines  |  [TEXT/DWat]

  1. datafile Pollen Data
  2. datalines 1 523
  3. readcolumn x 1
  4. readcolumn y 2
  5. rpn <y 1E-6 / >y       % scale by 1E-6
  6. graphlimits
  7. pointsymbol 4 cross
  8. sort
  9. fullscreen yes
  10. plotpoints
  11. graphunits inches
  12. graphframe 2 7 2 7
  13. drawframe
  14.  
  15. calc_correlation_coeff
  16. rpn <y >r0        % Save the y data in register 0
  17.  
  18. rpn 43 >e
  19. fitxy 1
  20. rpn <x a1 * a0 + >y
  21. pensize 1.5
  22. plotline
  23. pensize 0.25
  24.  
  25. TL
  26. digits 3
  27. fontsize 14
  28. drawlabel centerright Count = \a1 –\a1sig  \s· Distance  + \a0 –\a0sig
  29. TL
  30. pagemoveto xp yp 0.5 -
  31. drawlabel centerright Correlation Coeff: \r_cc
  32.  
  33. drawxlabel Distance (m)
  34. drawylabel Pollen Count
  35.  
  36. graphframe gleft gright gtop .25 + gtop 2 +
  37. showgraph
  38. drawaxis left inside outside line ticks perpendicular
  39. drawaxis right inside outside line ticks nolabels
  40.  
  41. rpn <y <r0 - >y rms
  42. set rms v0(1)
  43.  
  44. graphlimits
  45. drawylabel Fit RMS
  46. plotpoints
  47. drawtitle Polynomial Fit with Residuals
  48.  
  49. addheader
  50. figurenumber 3d Smith \\iet al.
  51.  
  52. fullscreen yes
  53. showpage